package com.csbr.prod.Dao;

import java.util.ArrayList;

import com.csbr.prod.Pojo.UsersEntity;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;


@Component
public interface UsersDao extends CrudRepository<UsersEntity,Integer> {
    Object findById(Integer integer);
    UsersEntity findByUsername(String name);
    Object findByUsernameAndPassword(String name,String pass);
    ArrayList<UsersEntity> findByUsernameLike(String name);

    // @Query(value = "select *  FROM users where username like CONCAT('%',:name,'%') ",nativeQuery = true)
    // ArrayList<UsersEntity> findlike(@Param("name") String name);
}
